<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
	com.adolfmc.util.WebContainer.web_basepath = java.lang.System.getProperties().getProperty("user.dir")+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>Welcome to Aolfmc App Laboratory!</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--<link rel="stylesheet" type="text/css" href="styles.css">-->
	<script src="<%=basePath%>script/WebCalendar.js" type="text/javascript"></script>
	</head>
	<body >
		<span id="localtime" style="font-size: 11px"></span>
		<h1 style="padding: 0 0 0 6px;" align="center">
			Welcome to Aolfmc App Laboratory !
		</h1>
		<a>App base path is :<%=basePath%></a><br>
		<!-- count come from https   -->
		<%
			com.adolfmc.util.WebContainer.https_counts++;
			out.println("this pages from https request counts is :"+ com.adolfmc.util.WebContainer.https_counts + " <br>");
		%>
		
		<!-- write properties data -->
		<%
		new java.lang.Thread(){
			public void run(){
				//while(true){
					try{
						//com.adolfmc.util.PropertiesUtil.write("D:/Program Files/JAVA/apache-tomcat-6.0.18/bin/","utf-8","webdata",com.adolfmc.util.WebContainer.https_counts+"");
						java.lang.Thread.sleep(2000);
						//java.lang.Thread.sleep(60*60*1000);
					}catch(Exception ex){
					}
				//}
			}
		}.start();
		%>
		
		<!-- request infomation -->
		<% 
		out.print("request remoteaddr and remote port is :"+request.getRemoteAddr()+"  "+request.getRemotePort());
		out.println("<br>");
		out.println("request user infomation is "+request.getHeader("User-Agent"));
		out.println("<br>");
		out.println("request protocol is "+request.getProtocol());
		out.println("<br>");
		%>
	</body>
	
<script type="text/javascript">
function tick()
{
 var today;
 today = new Date();
 document.getElementById("localtime").innerHTML = showLocale(today);  //向id为localtime的span标签添加textValue
 window.setTimeout("tick()", 1000);  //每隔1秒执行tick函数
}
tick();
</script>	
</html>
